package com.example.spring;

import com.example.spring.bean.Person;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ClassName:testPersonFactoryBean
 * Package:com.example.spring
 * Description:
 *
 * @Author:ZhangXin
 * @Create:2023/5/8-21:47
 * @Version:v1.0
 */
public class testPersonFactoryBean {
    @Test
    public void PersonFactoryBean() {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-bean.xml");
        Person person = applicationContext.getBean("person", Person.class);
        System.out.println(person);
    }
}
